import requests

response = requests.get("https://tieba.baidu.com/f?ie=utf-8&kw=%E5%86%85%E6%B6%B5")
print(response)
# print(response.content)

file_name = "E://documents//tie_ba.txt"
text_file = open(file_name, "w", encoding="gbk")
text_file.write(str(response.content))
text_file.close()

file =  open(file_name,encoding="gbk")
content = str(file.read(2000),"gbk")
print(content)
